
import axios from 'axios'
// 设置请求路径
const request = axios.create({
    baseURL:"http://192.168.1.7:7003",
}) 
// 使用路由拦截设置请求头
request.interceptors.request.use((req) => {
    let access_token = localStorage.getItem('access_token')
    if(access_token){
        req.headers.access_token = access_token;
    }
    req.headers.url = window.location.pathname
    return req
})

export default request